<?php

namespace App\Controller\Common;

use App\Base\BaseController;
use BaseExt\Captcha;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Symfony\Component\HttpFoundation\Request;

class CaptchaController extends BaseController
{
    /**
     * @route("/captcha_image",name="getCaptchaImg")
     */
    public function getCaptchaImg(Request $request)
    {
        $captcha = new Captcha($request);
        $captcha->doimg();
        die;
    }
    /**
     * @route("/captcha_json",name="getCaptchaJson")
     */
    public function getCaptchaJson(Request $request)
    {
        $captcha = new Captcha($request);
        return $this->json_out(1,"OK",$captcha->dobase64());
    }

}
